package TinTin.Main;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import TinTin.Main.R;
import android.app.ListActivity;
import android.os.Bundle;
import android.widget.SimpleAdapter;


public class TinTinContactActivity extends ListActivity {

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		SimpleAdapter m_adapter = new SimpleAdapter(this,getData(),
				R.layout.contactlist, 
				new String[]{"title","info","img"}, 
				new int[]{R.id.title,R.id.info,R.id.img});
		setListAdapter(m_adapter);
	}

	private List<Map<String, Object>> getData() {
		List<Map<String, Object>> m_list = new ArrayList<Map<String, Object>>();
		Map<String, Object> m_map = new HashMap<String, Object>();
		m_map.put("title", "G1");
		m_map.put("info", "Google 1");
		m_map.put("img", R.drawable.icon);
		m_list.add(m_map);
		
		m_map = new HashMap<String, Object>();
		m_map.put("title", "G2");
		m_map.put("info", "Google 2");
		m_map.put("img", R.drawable.icon);
		m_list.add(m_map);
		
		m_map = new HashMap<String, Object>();
		m_map.put("title", "G3");
		m_map.put("info", "Google 3");
		m_map.put("img", R.drawable.icon);
		m_list.add(m_map);
		
		return m_list;
	}
}
